﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Bowling.aspx.cs" Inherits="Bowling.Bowling" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<style type="text/css">
    .outer { BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: black 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: black 1px solid; BORDER-COLLAPSE: collapse }
    .frame { BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: black 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; MARGIN: 0px; BORDER-LEFT: black 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: black 1px solid; BORDER-COLLAPSE: collapse }
    .throw1 { BORDER-RIGHT: medium none; PADDING-RIGHT: 5px; BORDER-TOP: medium none; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; MARGIN: 5px; BORDER-LEFT: medium none; PADDING-TOP: 5px; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse }
    .throw2 { BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: black 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; MARGIN: 5px; BORDER-LEFT: black 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: black 1px solid; BORDER-COLLAPSE: collapse }
    .frameScore { BORDER-RIGHT: medium none; PADDING-RIGHT: 5px; BORDER-TOP: medium none; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; MARGIN: 5px; BORDER-LEFT: medium none; PADDING-TOP: 5px; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; TEXT-ALIGN: center }
</style>
<body>
    <form ID="form1" runat="server">
    <div>
        <table width="630">
            <tr>
                <td>
                    <asp:Button ID="btnBackToLogin" runat="server" Text="BACK" OnClick="btnBack_Click" ></asp:Button>
                
                    <asp:Button ID="btnNewGame" runat="server" Text="New Game" OnClick="btnNewGame_Click"></asp:Button>
                </td>
                <td align="right">
                    <asp:Label ID="LblGamestate" runat="server"></asp:Label>
                </td>
            </tr>
       </table>
       <hr />
       <asp:Panel ID="pnlController" runat="server" Width="630" Height="50" >
           <table width="630">
                <tr>
                    <td width="30">
                        Pins:
                    </td>
                    <td width="30">
                        <asp:TextBox ID="tbPins" runat="server" MaxLength="2" Width="30" ></asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btnRoll" runat="server" Text="Roll"  OnClick="btnRoll_Click" Width="60" ></asp:Button>
                        <asp:RangeValidator ID="vrngPins" runat="server" ErrorMessage="[1~10]" Display="Dynamic" ControlToValidate="tbPins" MaximumValue="10" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                    </td>
                </tr>
            </table>
       </asp:Panel>
       <hr />
    </div>

    *REPEATER 사용*
    <table class="outer" width="600">
        <tr>
            <asp:Repeater ID="repBowlingScore" runat="server">
                <ItemTemplate>
                    <td class="outer">
                        <table class="frame" width="60">
                            <tr>
                                <td class="throw1" width="30" height="30">
					                <%#DataBinder.Eval(Container.DataItem, "THROW1")%>
				                </td>
				                <td class="throw2" width="30" height="30">
					                <%#DataBinder.Eval(Container.DataItem, "THROW2")%>
				                </td>
                             </tr>
                             <tr>    
                                <td class="frameScore" colspan="2" width="60" height="30">
					                <%#DataBinder.Eval(Container.DataItem, "SCORE")%>
				                </td>
	                        </tr>
                        </table>
                    </td>
                </ItemTemplate>
            </asp:Repeater>
            <asp:Panel ID="pnlFrame_10" runat="server">
                <td class="outer">
			        <table class="frame" width="90">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblThrow_10_1" runat="server" ></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblThrow_10_2" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblThrow_10_3" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="3" width="90" height="30">
					            <asp:Label ID="LblScore_10" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
            </asp:Panel>
        </tr>
    </table>

    *기존 방식 테이블*
    <div>  
        <!-- Score START -->

        <table class="outer" width="630"> 
	        <tr>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame11" runat="server" ></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame12" runat="server" ></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame1Tot" runat="server" ></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame21" runat="server" ></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame22" runat="server" ></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame2Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame31" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame32" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame3Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame41" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame42" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame4Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame51" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame52" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame5Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame61" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame62" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame6Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame71" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame72" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame7Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame81" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame82" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame8Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="60">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame91" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame92" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="2" width="60" height="30">
					            <asp:Label ID="LblFrame9Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
		        <td class="outer">
			        <table class="frame" width="90">
				        <tr>
					        <td class="throw1" width="30" height="30">
					            <asp:Label ID="LblFrame101" runat="server" ></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame102" runat="server"></asp:Label>
					        </td>
					        <td class="throw2" width="30" height="30">
					            <asp:Label ID="LblFrame103" runat="server"></asp:Label>
					        </td>
				        </tr>
				        <tr>
					        <td class="frameScore" colspan="3" width="90" height="30">
					            <asp:Label ID="LblFrame10Tot" runat="server"></asp:Label>
					        </td>
				        </tr>
			        </table>
		        </td>
	        </tr>
        </table>
	    <!-- Score END -->
    </div>

    <hr />

    <div>
        <table width="630">
            <tr>
                <td>
                    Load No:
                    <asp:TextBox ID="tbLoadNo" runat="server" Width="30"></asp:TextBox>
                    <asp:Button ID="btnLoad" runat="server" Text="게임로드" OnClick="btnLoad_Click"></asp:Button>
                    <asp:Button ID="btnSave" runat="server" Text="게임저장" OnClick="btnSave_Click"></asp:Button>
                </td>
                <td align="right">
                    <asp:Button ID="btnRecordPage" runat="server" Text="기록보기" OnClick="btnRecordPage_Click"></asp:Button>
                </td>
            </tr>
       </table>
       <hr />
        
	</div>
    
    </form>
</body>
</html>
